Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HF] Fee output logic cleanup, allow 0-value fees #160

Merged
merged 3 commits into from
Jun 15, 2017

Conversation

instagibbs
Copy link
Contributor

@instagibbs instagibbs commented Apr 13, 2017

Previous logic, aside from allowing 0-fee outputs, was completely duplicated in other sections of the code.

The value-checking of outputs is already done in CheckTransaction, VerifyAmounts and VerifyCoinbaseAmount, so no need to check again in another context.

I can not recall why we disallowed 0-value fees initially, but the new logic is cleaner since we now always allow 0-value outputs as long as they're IsUnspendable, which fees are a smaller subset of.

I have also added more tests.

@instagibbs instagibbs changed the title [HF] Fee logic cleanup, allow 0-value fees [HF] Fee output logic cleanup, allow 0-value fees Apr 13, 2017
@instagibbs instagibbs merged commit ebf836d into ElementsProject:elements-0.13.1 Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant